const toChartData = (list, max = 0) => {
    let list1 = [];
    let list2 = [];
    let maxList = [];
    list.map((item) => {
        let dateStr = (item.the_day).substring(5, 10);
        for (let i = 0; i < 24; i++) {
            if (item["h" + i] == 0) {
                continue;
            }
            list1.push(dateStr + "\n" + i + "时")
            list2.push(item["h" + i])
            if (Number(max)>0) {
                maxList.push(max);
            }
        }
    });
    return { x: list1, series: list2, maxList: maxList };
}
export default toChartData